#!/usr/bin/bash

# key: $mod+Escape

key=$1

if [[ "" == $key ]] ; then
	echo "Error: empty param"
	bash ~/.sis/bin/sis-help

	# key="off" # - default # or:
	exit `false` # close this with error
elif [[ "--help" == $key || "--version" == $key ]] ; then
	bash ~/.sis/bin/sis-help $key
		
	exit `true` # close  - becose this help-run
fi

if [[ "on" == $key ]] ; then
	# wifi not replace to on, for security:
	# echo wifi on
	# ~/.sis/bin/sis-toogle wifi on

	# voise to 70
	echo volume max
	bash ~/.sis/bin/sis-float volume max

	# light to 70
	echo light max	
	~/.sis/bin/sis-float light max	

elif [[ "off" == $key ]] ; then

	# wifi replace to off, for security:
	echo wifi off # move to wifi::off
	bash ~/.sis/bin/sis-toogle wifi off

	# voise to 40
	echo volume min # move to volume::min
	bash ~/.sis/bin/sis-float volume min

	# light to 40
	echo light min # move to light::min
	bash ~/.sis/bin/sis-float light min
fi

exit `true`

